/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Homework1;

/**
 *
 * @author c0909g1054
 */
class Thread1 extends Thread
{
    public void run()
    {
        //i,j,k
        int i;
        int j;
        int k;

        //for
        for(k=0;k<5;k++)
        {
        for(i =1;i<=5;i++)
        {
             for(j=1; j<=5-i; j++)
            {
                System.out.print(" ");

            }

            //int max = 2*i-1;

            for(j=1; j<=2*i-1; j++)
            {
                System.out.print("*");
            }

	System.out.println();

        }
        }

    }
}
//Thead2
class Thread2 extends Thread
{
    public void run()
    {
    String[] Str={"Yeu To Quoc, Yeu Dong Bao", "Hoc Tap Tot, Lao Dong Tot","Doan Ket Tot, Ky Luat Tot","Giu Gin Ve Sinh That Tot","Khiem Ton That Tha Dung Cam"};

    int number;
    int i;
    for(i=0,number=0;i<5;i++,number++)
    {
        System.out.println((number+1)+"- "+Str[i]);

    }

    }
}

class Thread3 extends Thread
{
    public void run()
    {
        int i=1;
        int j=1;
        int x = i+j;
        for(i=1;i<50;i++)
        {
            i=j;
            j=x;
            x= i+j;
            System.out.println(i);
        }
    }
}

public class Problem2 {
    public static void main(String args [])
    {
        Thread1 t1 = new Thread1();
        Thread2 t2 = new Thread2();
        Thread3 t3 = new Thread3();
        t1.start();
        t2.start();
        t3.start();


    }

}
